#include <bits/stdc++.h>
using namespace std;
int n,r[100010];
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=0;i<n;i++)cin>>r[i];
    sort(r,r+n);
    int i=0,j=0;
    for(;i<n;i++,j++){
        if(j>=n)break;
        while(j<n&&r[i]>=r[j])j++;
        if(j>=n)break;
    }
    cout<<n-i<<endl;
    return 0;
}